home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / usr / sybase / doc / dbcolname.man < prev    next >
Text File  |  1993-04-22  |  2KB  |  89 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89                dbcolname
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbcolname
  6.  
  7.   FUNCTION:
  8.        Return the name of a regular result column.
  9.  
  10.   SYNTAX:
  11.        char *dbcolname(dbproc, column)
  12.  
  13.        DBPROCESS *dbproc;
  14.        int       column;
  15.  
  16.   COMMENTS:
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbcolname               Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.        o This routine returns a pointer to the null-terminated name of a
  28.          regular (i.e., non-compute) result column.
  29.        o Here's a small program fragment that uses dbcolname():
  30.  
  31.          DBPROCESS       *dbproc;
  32.  
  33.          /* put the command into the command buffer */
  34.          dbcmd(dbproc, "select name, id, type from sysobjects");
  35.  
  36.          /* send the command to SQL Server and begin execution */
  37.          dbsqlexec(dbproc);
  38.  
  39.          /* process the command results */
  40.          dbresults(dbproc);
  41.  
  42.          /* examine the column names */
  43.  
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89                dbcolname
  47.   ______________________________________________________________________
  48.          printf("first column name is %s\n", dbcolname(dbproc, 1));
  49.          printf("second column name is %s\n", dbcolname(dbproc, 2));
  50.          printf("third column name is %s\n", dbcolname(dbproc, 3));
  51.  
  52.  
  53.   PARAMETERS:
  54.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  55.            connection for a particular front-end/SQL Server process.  It
  56.            contains all the information that DB-Library uses  to  manage
  57.            communications and data between the front end and SQL Server.
  58.        column -  The number of the column of interest.  The first column
  59.            is number 1.
  60.  
  61.   RETURNS:
  62.        A char pointer to the  null-terminated  name  of  the  particular
  63.        column.   If  the  column  number  is  not  in range, dbcolname()
  64.        returns NULL.
  65.  
  66.  
  67.  
  68.   dbcolname               Version 4.0 -- 5/1/89                        4
  69.   ______________________________________________________________________
  70.  
  71.   SEE ALSO:
  72.        dbcollen, dbcoltype, dbdata, dbdatlen, dbnumcols
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.